<?php

$js_array = array(
    'jquery/validate/jquery.validate.js',
    'jquery/validate/additional-methods.js',
    'profile.js',
);

get_backend_header($js_array);

?>

<h2 class ="title"><?php echo $title; ?></h2>

<form id="profile" name="profile" class="form">
	<input type="hidden" name="user_id" id="user_id" value="<?php echo $user_id; ?>" />
        <div class="unit">
            <div class ="line">
                <label class="unit bold">User No:</label>
                <div class="unit field">
                        <?php echo $user_no; ?>
                </div>
            </div>

            <div class ="line">
                <label class="unit bold">First Name:</label>
                <div class="unit field">
                        <?php echo $fname; ?>
                </div>
            </div>

            <div class ="line">
                <label class="unit bold">Middle Name:</label>
                <div class="unit field">
                        <?php echo $mname; ?>
                </div>
            </div>

            <div class ="line">
                <label class="unit bold">Last Name:</label>
                <div class="unit field">
                       <?php echo $lname; ?>
                </div>
            </div>

        </div>

        <div class="unit">
            <div class ="line">
                <label class ="unit bold">Email:</label>
                <div class="unit field">
                    <input type="text" tabIndex="60" id="email" name="email" value="<?php echo $email; ?>" />
                </div>
            </div>

            <div class ="line">
                <label class ="unit">Contact No:</label>
                <div class="unit field">
                        <input type="text" tabIndex="70" id="contact_no" name="contact_no" value="<?php echo $contact_no; ?>" />
                </div>
            </div>

            <div class ="line">
                <label class ="unit">Contact Person:</label>
                <div class="unit field">
                        <input type="text" tabIndex="80" id="contact_person" name="contact_person" value="<?php echo $contact_person; ?>" />
                </div>
            </div>

            <div class ="line">
                <label class ="unit">Address:</label>
                <div class="unit field" style ="height: 120px;">
                        <textarea tabIndex="90" id="address" name="address"><?php echo $address; ?></textarea>
                </div>
            </div>

        </div>
</form>

<div class ="clear"></div>

<div class="buttons">
    <button tabIndex="240" id="save" name="save">Save</button>
</div>

<script type="text/javascript">
	$('#first_name').focus();
	
	profileRules();
		
	$('#birth_date').datepicker();
	
	$('#save').button({
		icons: {primary: 'ui-icon-disk'}
	}).click(function() {
		$('#profile').submit();
	});
</script>
<?php
get_backend_footer();